package com.wing.productionPlan.service;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wing.productionPlan.dao.RequirePlanDao;
import com.wing.productionPlan.dao.RequirePlanItermDao;
import com.wing.productionPlan.enumeration.AuditStatusEnum;
import com.wing.productionPlan.enumeration.OperationEnumType;
import com.wing.productionPlan.model.entity.RequirePlan;
import com.wing.productionPlan.model.entity.RequirePlanItem;
import com.wing.productionPlan.model.response.RequirePlanItermVO;
import com.wing.productionPlan.model.response.RequirePlanVO;
import com.wing.web.excel.RequirePlanExcelln;
import com.wing.web.utils.JwtUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;


/**
 * 需求计划表-ServiceImpl
 *
 * @author
 */
@Service
@Slf4j
public class RequirePlanItermServiceImpl extends ServiceImpl<RequirePlanItermDao, RequirePlanItem> implements RequirePlanItermService {


    @Override
    public Page<RequirePlanItermVO> selectPlanItermList(Page<RequirePlanItermVO> pg, Map map) {
        List<RequirePlanItermVO> vos = this.baseMapper.selectPlanItermList(pg, map);
        pg.setRecords(vos);
        return pg;
    }

    @Override
    public RequirePlanItermVO getPlanItermById(Long id) {
        return this.baseMapper.getPlanItermById(id);
    }



}

